﻿using System;

namespace DL.AI.AIBT.Example
{
    public class Condition : IStrategy
    {
        private readonly Func<bool> m_Predicate;

        public Condition(Func<bool> predicate)
        {
            m_Predicate = predicate;
        }

        public Status Process()
        {
            return m_Predicate.Invoke() ? Status.Success : Status.Failure;
        }

        public void Reset()
        {
        }
    }
}